package crond

import (
	"system-admin/internal/app/web/service/alarm"

	"github.com/robfig/cron/v3"
)

// CrondInit 定时任务初始化
func CrondInit() {
	crond := cron.New(cron.WithSeconds())
	// 每隔1s钟，检测告警消息队列
	crond.AddFunc("* * * * * *", alarm.PushAlarmMsgCrond)
	crond.AddFunc("* * * * * *", SendSMS)
	crond.Start()
}
